package com.durian.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 购物车表  实体类
 *
 * @author Durian
 * @since 2023-11-23
 */
@Data
@Builder
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("obs_shopcar")
public class ObsShopcar implements Serializable {

    /**
     * 购物车id
     */
    @TableId(value = "shopcar_id")
    private Long shopcarId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 书籍id
     */
    private Long bookId;

    /**
     * 地址id
     */
    private Long addressId;

    /**
     * 加入购物车的时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime bookAddDate;

    /**
     * 书籍数量
     */
    private Integer bookCount;

    /**
     * 逻辑删除(存在：0；删除：1)
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;
}
